#include<bits/stdc++.h>
using namespace std;
using ll=long long int;

int main()
{
    ll n;cin>>n;
    string ret;
    int count=0;
    while(n)
    {
        count++;
        char tem=n%10+'0';
        ret.push_back(tem);
        if(count==3)
        {
            count=0;
            ret.push_back(',');
        }
        n/=10;
    }
    reverse(ret.begin(),ret.end());
    if(ret[0]==',')
    {
        cout<<ret.substr(1)<<endl;

    }
    else cout<<ret<<endl;
    return 0;
}